<!DOCTYPE html>
<html>
<head>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
    <meta charset="UTF-8">
    <title>解禁申请列表</title>
    <link rel="stylesheet" type="text/css" href="/css/ecalendar.css">
    <link rel="stylesheet" href="/css/vendor/common.css" type="text/css">
    <link rel="stylesheet" href="/css/vendor/cmp-controls.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="/css/vendor/page-control.css">
    <link href="/css/vendor/common-grid.less" rel="stylesheet/less" type="text/css">
    <link href="/css/vendor/drone-filter.less" rel="stylesheet/less" type="text/css">
    <script src="/js/less.min.js"></script>
</head>

<body>

<main>

    <div class="filter-wrap">
        <div class="title-bar">
            <label>过滤器</label>
            <img class="filter-toggle-icon button rotate-180" onClick="droneFilter.clickFilterToggle(this)">
        </div>

        <div id="drone-filter">
            <div class="container">
                <div class="row clearfix">
                    <div class="col-md-4 col-sm-6 col-xs-12">
                        <table>
                            <tr>
                                <th>申请项目名称:</th>
                                <td><input type="text" name="name" value=""></td>
                            </tr>
                            <tr>
                                <th>申请说明:</th>
                                <td><input type="text" name="notes" value=""></td>
                            </tr>
                        </table>
                    </div>
                    <div class="col-md-4 col-sm-6 col-xs-12">
                        <table>
                            <tr>
                                <th>审批状态:</th>
                                <td><input type="text" name="status" value=""></td>
                            </tr>
                        </table>
                    </div>
                    <div class="col-md-4 col-sm-6 col-xs-12">
                        <table>
                            <tr>
                                <th>修改时间:</th>
                                <td><input type="date-h" name="created_at_start" data-attr="date"
                                           value="">-<input type="date-h" name="created_at_end" data-attr="date right" class="end"
                                                            value=""></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <div id="btn_reset_param" class="btn-0 button">清 空</div>
                                    <div id="btn_search_data" class="btn-1 button">过 滤</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div id="data-wrap">

        <div class="table-title-wrap">
            <table id="table-header" class="title" cellpadding="0" cellspacing="0" border="1" bordercolor="#d8d8d8">
            </table>
        </div>

        <div class="table-data-wrap">
            <table class="data" id="mytable" cellpadding="0" cellspacing="0" border="1" bordercolor="#d8d8d8">
            </table>
        </div>

        <!-- 如果要隐藏就class加 hidden即可 -->


        <div class="multi-del-wrap {% block hiddenOperation %}{% endblock %}">
            <input type="checkbox" id="select-all-element" class="{% block hiddenCheckAll %}{% endblock %}"><label
                for="select-all-element" class="button">所有元素
            (
            <span id="data_count_total">0</span>
            )</label>
            <div id="multi-delete" onclick="PageDataProxy.batchDelete()"
                 class="button {% block hiddenDeleteAll %}{% endblock %}">
                <img class="multi-del-icon">删除
            </div>
        </div>

        <div class="rows-perpage-wrap">
            <select id="rows-perpage-select">
                <option value="15">15</option>
                <option value="25" selected>25</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="150">150</option>
                <option value="200">200</option>
            </select>
            <label>每页显示条数</label>
        </div>
    </div>
</main>

</body>

<script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/Ecalendar.jquery.min.js"></script>
<script src="/js/vendor/cmp-controls.js"></script>
<script src="/js/validator.min.js"></script>
<script src="/js/vendor/common.js"></script>
<script src="/js/vendor/page-control.js"></script>
<script src="/js/vendor/drone-filter.js"></script>
<script src="/js/vendor/data-loading.js"></script>
<script>
    $(function () {
        DataAttrBinder.init();
    })

</script>
<script>
    var isGetMode=false;

    function clickDetail(result){
        if(isGetMode){
            window.parent.childrenCallBack(result);
        }else{
            PageDataProxy.actionDetail(result)
        }
    }

    $(function () {
        isGetMode=getQueryString("isGet");
        PageDataProxy.init({
            "action_detail_url": "/version/detailAppUpdateTool",
            "url": "/zone/getLiftNoFlyZone",
            "table_id": "#mytable",
            "page_control_id": "#data-wrap",
            "page_size_id": "#rows-perpage-select",
            "page_total_id": "#data_count_total",
            "use_check_box": false,
            "data_field_process": function (name, value) {
                if (name == "company") {
                    return PageDataProxy.formatShortContent(value, 18);
                }

                if(name=="id"){
                    return "<a href='javascript:void(0)' onclick=clickDetail('id=" + value + "')>" + value + "</a>";

                }
                return value;
            },
            "table_style": {
                "id": "width-s",
                "created_at": "width-m",
                "name": "width-m",
                "notes": "width-m",
                "status": "width-s",
                "explain_text": "width-m"
            },
            "data_field_action_process": function (tag) {
                return "<td onclick=PageDataProxy.actionDetail('id=" + tag + "')><img class='action-show-icon'>详细</td>";
                //return "<td onclick='actionDetail(" + tag + ")'><img class='action-show-icon'>详细</td>";
            },
        });
        $("#btn_reset_param").click(function () {
            $("#drone-filter input").each(function () {
                $(this).val("");
            });
        });
        $("#btn_search_data").click(function () {
            PageDataProxy.refresh();
        });
    })
</script>
</html>